{{include file="VIEW_PATH/header.php"}}
<body>
<form method="post" action="{{U('set')}}">
    <input type="text" name="role_id" value="{{$_GET['role_id']}}">
    {{foreach from="$node" key="$k" value="$v"}}
        <h2>
            <input type="checkbox" name="node[]" value="{{$v['id']}}"
               <if value="in_array($v['id'],$access)">
                   checked
                   </if>
            >
            {{$v['title']}}</h2>
        {{foreach from="$v['_data']" key="$n" value="$m"}}
                   <h3> <input type="checkbox" name="node[]" value="{{$m['id']}}"
                       <if value="in_array($m['id'],$access)">
                           checked
                       </if>
                       >
                       {{$m['title']}}</h3>
                    <ul class="level3">
                    {{foreach from="$m['_data']" key="$a" value="$b"}}
                        <li>
                            <input type="checkbox" name="node[]" value="{{$b['id']}}"
                            <if value="in_array($b['id'],$access)">
                                checked
                            </if>
                            >{{$b['title']}}
                        </li>
                        {{endforeach}}
                    </ul>
            {{endforeach}}
    {{endforeach}}
    <input type="submit" class="hd_btn hd_btn-primary"/>
</form>
</body>
</html>

<style type="text/css">
    h3{
        clear: both;
        margin-top: 25px;
    }
    ul{
        height: auto;
        overflow: hidden;
    }
    ul.level2 li{
    }
    ul.level3 li{
        float:left;margin-right: 10px;
    }
</style>